package com.xyht.sca_s.student_manage_system.modules.rxRegistrationConfirm.controller;


import com.xyht.sca_s.student_manage_system.common.annotation.RequestPass;
import com.xyht.sca_s.student_manage_system.common.commonReturn.ResponseResult;
import com.xyht.sca_s.student_manage_system.common.desEncodeAndDecode.annotation.SecretBody;
import com.xyht.sca_s.student_manage_system.modules.rxRegistrationAdvance.entity.req.RxRegistrationAdvanceStudentInfoAddReq;
import com.xyht.sca_s.student_manage_system.modules.rxRegistrationConfirm.entity.req.RxRegistrationConfirmPaymentReq;
import com.xyht.sca_s.student_manage_system.modules.rxRegistrationConfirm.service.RxRegistrationConfirmService;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 确认招生阶段 前端控制器
 * </p>
 *
 * @author XYHT
 * @since 2024-05-18
 */
@RestController
@RequestMapping("/rxRegistrationConfirm/confirm")
@SecretBody
public class RxRegistrationConfirmController {
    @Resource
    private RxRegistrationConfirmService rxRegistrationConfirmService;

    @ApiOperation("获取确认报名数据")
    @GetMapping("/getConfirmData")
    @RequestPass
    public ResponseResult getRegistrationConfirmStudentInfo(@RequestParam("idCard") String stuIdCard) {
        return rxRegistrationConfirmService.getRegistrationConfirmStudentInfo(stuIdCard);
    }

    @ApiOperation("提交确认报名信息")
    @PostMapping("/confirmPayment")
    @RequestPass
    public ResponseResult advancePayment(@RequestBody RxRegistrationConfirmPaymentReq paymentReq) {
        return rxRegistrationConfirmService.registrationConfirmPayment(paymentReq);
    }

}

